module Qsort where

qsort [] = []
qsort (a:as) = qsort left ++ [a] ++ qsort right 
   where (left, right) = (filter (<=a) as, filter (>a) as)

main = do { print (qsort [8,4,0,3,1,23,11,18]) }